package org.devops

//代码检出
def GetCode(srcUrl,branchName,credentialsId) {

    checkout([$class: 'GitSCM', branches: [[name: "${branchName}"]], 
        doGenerateSubmoduleConfigurations: false, 
        extensions: [], submoduleCfg: [], 
        userRemoteConfigs: [[credentialsId: "${credentialsId}", 
        url: "${srcUrl}"]]])
}